package com.power.bank.member.service.impl;

import java.util.List;
import com.power.bank.common.utils.DateUtils;
import com.power.bank.member.domain.PbMember;
import com.power.bank.member.mapper.PbMemberMapper;
import com.power.bank.member.service.IPbMemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 会员信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-13
 */
@Service
public class PbMemberServiceImpl implements IPbMemberService
{
    @Autowired
    private PbMemberMapper pbMemberMapper;

    /**
     * 查询会员信息
     * 
     * @param id 会员信息主键
     * @return 会员信息
     */
    @Override
    public PbMember selectPbMemberById(Long id)
    {
        return pbMemberMapper.selectPbMemberById(id);
    }

    /**
     * 查询会员信息列表
     * 
     * @param pbMember 会员信息
     * @return 会员信息
     */
    @Override
    public List<PbMember> selectPbMemberList(PbMember pbMember)
    {
        return pbMemberMapper.selectPbMemberList(pbMember);
    }

    /**
     * 新增会员信息
     * 
     * @param pbMember 会员信息
     * @return 结果
     */
    @Override
    public int insertPbMember(PbMember pbMember)
    {
        pbMember.setCreateTime(DateUtils.getNowDate());
        return pbMemberMapper.insertPbMember(pbMember);
    }

    /**
     * 修改会员信息
     * 
     * @param pbMember 会员信息
     * @return 结果
     */
    @Override
    public int updatePbMember(PbMember pbMember)
    {
        pbMember.setUpdateTime(DateUtils.getNowDate());
        return pbMemberMapper.updatePbMember(pbMember);
    }

    /**
     * 批量删除会员信息
     * 
     * @param ids 需要删除的会员信息主键
     * @return 结果
     */
    @Override
    public int deletePbMemberByIds(Long[] ids)
    {
        return pbMemberMapper.deletePbMemberByIds(ids);
    }

    /**
     * 删除会员信息信息
     * 
     * @param id 会员信息主键
     * @return 结果
     */
    @Override
    public int deletePbMemberById(Long id)
    {
        return pbMemberMapper.deletePbMemberById(id);
    }
}
